var allAPI = allAPI || {};

allAPI = (function(){
	var api = allAPI, dt = 'Dt.json'
	api.root = function(){
		var a_1 = '*yzm*cr*';
		var pn = location.pathname
			,str = ''
			,userType = document.getElementById('__user__').getAttribute('data-usertype') || ''
		;
		if(/websiteHome/g.test(pn) || (userType && userType == 1) || localStorage.userType == 1){str = '/websiteHome'}
		else if(/companyHome/g.test(pn) || (userType && userType == 2) || localStorage.userType == 2){str = '/companyHome'}
		return str;
	}
	var root = api.root();
	return {
		user : {
			hasMobile : '/userHasMobile' + dt
			,hasEmail : '/userHasEmail' + dt
			,pwdReset : '/userPwdReset' + dt
			// 检查是否开启验证
			,isOverflow : '/isOverflow' + dt
			,isLogin : '/userIsLogin' + dt
			,reg : '/userReg' + dt
			,login : '/userLogin' + dt
			,exit : '/userExit' + dt
			,paySubmit : '/userFront/paySubmit.html'
			,manage : '/userFront/getManage.json'
			,recommendInfo : root + '/recommendInfo' +dt
			,info : root + '/userInfo' + dt
			,infoEdit : root + '/userInfoEdit' + dt
			,pwdEdit : root + '/userPwdEdit' + dt
			,payPwdEdit : root + '/userPayPwdEdit' + dt
			,bankEdit : root + '/userBankEdit' + dt
			,newMobileEdit : root + '/userNewMobileEdit' + dt
			,newEmailEdit : root + '/userNewEmailEdit' + dt
			,needPlateList : root + '/userNeedPlateList' + dt
			,needPlateAdd : root + '/userNeedPlateAdd' + dt
			,actionAdd : root + '/actionAdd' + dt

			// 站内信 - 列表
			,noticeList : '/noticeUserList' + dt
			// 站内信 - 详情
			,noticeView : '/noticeView' + dt
			// 站内信 - 已读
			,noticeRead : '/noticeUserRead' + dt

			// 是否绑定微信
			,isBindWechat : '/userFront/isBindWechat.json'
		}
		,sms : {
			codeCheck : '/smsCodeCheck' + dt
			,codeSend0 : '/smsCodeSend' + dt
			,codeSend1 : root + '/smsCodeSend' + dt
			,config : '/smsConfig' + dt
		}
		,mail : {
			codeSend : root + '/mailCodeSend' + dt
		}

		,noticeList : '/noticeList' + dt
		,adList : '/adList' + dt
		,ssList : root + '/adList' + dt

		,provinceList : '/province/list.json'
		,cityList : '/city/list.json'
		,feedbackAdd : '/feedback/add.json'
		,articleView : '/articleView' + dt
		,helpList : '/helpList' + dt

		,articleAdd : root + '/articleAdd' + dt

		,billList : root + '/billList' + dt
		,billStat : root + '/billStat' + dt
		,withdrawList : root + '/billing/withdrawList' + dt
		,withdrawing : root + '/billing/withdrawing' + dt
		,withdrawed : root + '/billing/withdrawed' + dt
		,smallWithdrawList : root + '/billing/smallWithdrawList' + dt
		,userWithdrawInfo : root + '/userWithdrawInfo' + dt
		,withdraw : root + '/billing/withdraw' + dt
		,withdrawExport : root + '/withdraw/export.json'
		,billExport : root + '/billing/export.json'

		,orderItemComplaintAdd : root + '/orderItemComplaintAdd' + dt
		,orderItemComplaintView : root + '/orderItemComplaintView' + dt
		,orderCanCancels : root + '/orderCanCancels' + dt
		,orderItemCancels : root + '/orderItemCancels' + dt
		,orderItemCancel : root + '/orderItemCancel' + dt
		,orderItemList : root + '/orderItemList' + dt
		,orderItemAdd : root + '/orderItemAdd' + dt
		,orderItemDel : root + '/orderItemDel' + dt
		,orderItemStat1 : root + '/orderItemStat1' + dt
		,orderItemStat2 : root + '/orderItemStat2' + dt
		,orderItemReject : root + '/orderItemReject' + dt
		,orderItemAppeal : root + '/orderItemAppeal' + dt
		,orderItemLinkAdd : root + '/orderItemLinkAdd' + dt
		,orderItemLink2Add : root + '/orderItemLink2Add' + dt
		,orderItemPay : root + '/orderItemPay' + dt
		,orderItemReminder : root + '/orderItemReminder' + dt
		,orderView : root + '/orderView' + dt
		
		,userPayPwdCheck : root + '/userPayPwdCheck' + dt

		//---------- orderAdd ----------
		,articleOrderAdd : root + '/articleOrderAdd' + dt
		,paperOrderAdd : root + '/paperOrderAdd' + dt
		,wechatOrderAdd : root + '/wechatOrderAdd' + dt
		,friendOrderAdd : root + '/friendOrderAdd' + dt
		,weiboOrderAdd : root + '/weiboOrderAdd' + dt
		,clientOrderAdd : root + '/clientOrderAdd' + dt
		//---------- orderList ----------
		,articleOrderList : root + '/articleOrderList' + dt
		,wechatOrderList : root + '/wechatOrderList' + dt
		,friendOrderList : root + '/friendOrderList' + dt
		,weiboOrderList : root + '/weiboOrderList' + dt
		,clientOrderList : root + '/clientOrderList' + dt
		,pxyarticleOrderList : root + '/pxyarticleOrderList' + dt
		//---------- orderView ----------
		,articleOrderView : root + '/articleOrderView' + dt
		,wechatOrderView : root + '/wechatOrderView' + dt
		,friendOrderView : root + '/friendOrderView' + dt
		,weiboOrderView : root + '/weiboOrderView' + dt
		,paperOrderView : root + '/paperOrderView' + dt
		,starOrderView : root + '/starOrderView' + dt
		,liveOrderView : root + '/liveOrderView' + dt
		,xhsOrderView : root + '/xhsOrderView' + dt
		,clientOrderView : root + '/clientOrderView' + dt
		,pxyarticleOrderView : root + '/pxyarticleOrderView' + dt
		//---------- orderDel ----------
		,articleOrderDel : root + '/articleOrderDel' + dt
		,wechatOrderDel : root + '/wechatOrderDel' + dt
		,friendOrderDel : root + '/friendOrderDel' + dt
		,weiboOrderDel : root + '/weiboOrderDel' + dt
		,clientOrderDel : root + '/clientOrderDel' + dt
		,pxyarticleOrderDel : root + '/pxyarticleOrderDel' + dt
		//---------- orderCopy ----------
		,articleOrderCopy : root + '/articleOrderCopy' + dt
		,wechatOrderCopy : root + '/wechatOrderCopy' + dt
		,friendOrderCopy : root + '/friendOrderCopy' + dt
		,weiboOrderCopy : root + '/weiboOrderCopy' + dt
		,clientOrderCopy : root + '/clientOrderCopy' + dt


		,intentOrderItemList : root + '/intentOrderItemList' + dt
		,intentOrderItemStat2 : root + '/intentOrderItemStat2' + dt
		,intentOrderItemAccept : root + '/intentOrderItemAccept' + dt
		,intentOrderItemReject : root + '/intentOrderItemReject' + dt
		,intentOrderItemEdit : root + '/intentOrderItemEdit' + dt
		
		,starOrderItemList : root + '/starOrderItemList' + dt
		,starOrderItemStat2 : root + '/starOrderItemStat2' + dt
		,starOrderItemAccept : root + '/starOrderItemAccept' + dt
		,starOrderItemReject : root + '/starOrderItemReject' + dt
		,starOrderItemEdit : root + '/starOrderItemEdit' + dt
		,starOrderAudit : root + '/starOrderAudit' + dt
		,starOrderItemPay : root + '/starOrderItemPay' + dt

		,articleOrderItemAddNeed : root + 'articleOrderItemAddNeed' + dt
		,friendOrderItemAddNeed : root + 'friendOrderItemAddNeed' + dt
		,weiboOrderItemAddNeed : root + 'weiboOrderItemAddNeed' + dt
		,wechatOrderItemAddNeed : root + 'wechatOrderItemAddNeed' + dt
		,articleOrderItemAddNeed : root + 'articleOrderItemAddNeed' + dt
		,clientOrderItemAddNeed : root + 'clientOrderItemAddNeed' + dt

		,multiContentList : root + '/multiContentList' + dt
		,multiContentDel : root + '/multiContentDel' + dt
		,multiContentAdd : root + '/multiContentAdd' + dt

		,articleResWebList : root + '/articleResWebList' + dt
		,articleResChannelList : root + '/articleResChannelList' + dt
		,articleWebView : root + '/articleWeb/view.json'
		,articleWechatImg : root + '/articleWechatImg' + dt

		//---------- resInfo ----------
		,articleResInfo : root + '/articleResInfo' + dt
		,friendResInfo : root + '/friendResInfo' + dt
		,weiboResInfo : root + '/weiboResInfo' + dt
		,wechatResInfo : root + '/wechatResInfo' + dt
		,liveResInfo : root + '/liveResInfo' + dt
		,videoResInfo : root + '/videoResInfo' + dt
		,starResInfo : root + '/starResInfo' + dt
		,xhsResInfo : root + '/xhsResInfo' + dt
		,clientResInfo : root + '/clientResInfo' + dt
		//---------- resAdd ----------
		,articleResAdd : root + '/articleResAdd' + dt
		,friendResAdd : root + '/friendResAdd' + dt
		,weiboResAdd : root + '/weiboResAdd' + dt
		,wechatResAdd : root + '/wechatResAdd' + dt
		,liveResAdd : root + '/liveResAdd' + dt
		,videoResAdd : root + '/videoResAdd' + dt
		,starResAdd : root + '/starResAdd' + dt
		,xhsResAdd : root + '/xhsResAdd' + dt
		,clientResAdd : root + '/clientResAdd' + dt
		//---------- resView ----------
		,articleResView : root + '/articleResView' + dt
		,paperResView : root + '/paperResView' + dt
		,friendResView : root + '/friendResView' + dt
		,weiboResView : root + '/weiboResView' + dt
		,wechatResView : root + '/wechatResView' + dt
		,liveResView : root + '/liveResView' + dt
		,videoResView : root + '/videoResView' + dt
		,starResView : root + '/starResView' + dt
		,xhsResView : root + '/xhsResView' + dt
		,clientResView : root + '/clientResView' + dt
		//---------- resDetails ----------
		,videoResDetails : root + '/videoResDetails' + dt
		//---------- resList ----------
		,articleResList : root + '/articleResList' + dt
		,paperResList : root + '/paperResList' + dt
		,resDynamicList : root + '/resDynamicList' + dt
		,friendResList : root + '/friendResList' + dt
		,weiboResList : root + '/weiboResList' + dt
		,wechatResList : root + '/wechatResList' + dt
		,liveResList : root + '/liveResList' + dt
		,videoResList : root + '/videoResList' + dt
		,starResList : root + '/starResList' + dt
		,xhsResList : root + '/xhsResList' + dt
		,clientResList : root + '/clientResList' + dt
		//---------- resCheckPrice ----------
		,wechatCheckPriceList : root + '/wechatCheckPriceList' + dt
		,weiboCheckPriceList : root + '/weiboCheckPriceList' + dt
		//---------- resSearch ----------
		,resSearch : root + '/resSearch' + dt
		,resSearchBatch : root + '/resSearchBatch' + dt
		,resSearchCount : root + '/resSearchCount' + dt

		,articleQuoteExport : root + '/articleQuote/export.json'
		,clientQuoteExport : root + '/clientQuote/export.json'
		,openWeiboQuoteExport : root + '/openWeiboQuote/export.json'
		,openWechatQuoteExport : root + '/openWechatQuote/export.json'
		,openFriendQuoteExport : root + '/openFriendQuote/export.json'

		,resPriceUpdate : root + '/resPriceUpdate' + dt
		,resStat : root + '/resStat' + dt
		,resOrderStat : root + '/resOrderStat' + dt
		,resStatusUpdate : root + '/resStatusUpdate' + dt
		,resDel : root + '/resDel' + dt
		,resQuoteList : root + '/resQuoteList' + dt
		,resQuoteAdd : root + '/resQuoteAdd' + dt
		,resQuoteDel : root + '/resQuoteDel' + dt
		,resQuoteView : root + '/resQuoteView' + dt
		,resQuoteItemList : root + '/resQuoteItemList' + dt
		,resQuoteItemAdd : root + '/resQuoteItemAdd' + dt
		,resQuoteItemDel : root + '/resQuoteItemDel' + dt
		,resCollectCheck : root + '/resCollectCheck' + dt
		,resCollectAdd : root + '/resCollectAdd' + dt
		,resCollectDel : root + '/resCollectDel' + dt
		,resCollectList : root + '/resCollectList' + dt
		,resDealsList : root + '/resDealsList' + dt
		,resDealsItemList : root + '/resDealsItemList' + dt
		,resDealsExport : root + '/deals/export.json'
		,resBlackList : root + '/resBlackList' + dt
		,resBlackAdd : root + '/resBlackAdd' + dt
		,resBlackDel : root + '/resBlackDel' + dt

		,cartCheck : root + '/cartCheck' + dt
		,cartCount : root + '/cartCount' + dt
		,cartAdd : root + '/cartAdd' + dt
		,cartDel : root + '/cartDel' + dt
		,cartDels : root + '/cartDels' + dt
		,cartList : root + '/cartList' + dt

		,articleOrderExport : root + '/articleOrder/export.json'
		,wechatOrderExport : root + '/openWechatOrder/export.json'
		,friendOrderExport : root + '/openFriendOrder/export.json'
		,weiboOrderExport : root + '/openWeiboOrder/export.json'
		,clientOrderExport : root + '/clientOrder/export.json'
 
		,colsePopSell : root + '/colsePopSell' + dt

		//评价接口 - 广告主添加评价
		,gradeItemAdd : root + '/gradeItemAdd' + dt
		//评价接口 - 广告主查询资源下的有效评价
		,gradeResList : root + '/gradeResList' + dt
		//评价接口 - 广告主查询可以评价的订单
		,gradeOrderList : root + '/gradeOrderList' + dt
		//评价接口 - 广告主查询可以评价的订单
		,gradeOrderInfo : root + '/gradeOrderInfo' + dt
		//评价接口 - 广告主
		,gradeResScore : root + '/gradeResScore' + dt
		//评价接口 - 广告主
		,gradeMoreResScore : root + '/gradeMoreResScore' + dt
		//评价接口 - 媒介主评价列表
		,gradeList : root + '/gradeList' + dt
		//评价接口 - 媒介主回复
		,gradeAdd : root + '/gradeAdd' + dt

		//极验验证
		,geetestImgCode : '/geetestImgCode.json'

		// 竞标(微信)查询
		,bidOrderWechatList : root + '/bidOrderWechatList' + dt
		// 竞标(微信)添加
		,bidOrderWechatAdd : root + '/bidOrderWechatAdd' + dt
		// 竞价(微信)支付
		,bidOrderPay : root + '/bidOrderPay' + dt
		// 竞价(微信)统计
		,bidOrderInfo : root + '/bidOrderInfo' + dt
		// 竞价拒绝
		,orderItemDisagrees : root + '/orderItemDisagrees' + dt
		// 竞价派单
		,orderItemGives : root + '/orderItemGives' + dt
		// 竞价(微信)任务大厅
		,bidOrderWechatTaskList : root + '/bidOrderWechatTaskList' + dt
		// 竞标总预算&竞标人数
		,bidOrderWechatBidInfo : root + '/bidOrderWechatBidInfo' + dt
		// 竞价(微信)订单详情
		,bidOrderWechatView : root + '/bidOrderWechatView' + dt
		// 竞价(微信)竞标人数&成功人数&成功总金额
		,bidOrderWechatUserInfo : root + '/bidOrderWechatUserInfo' + dt
		// 竞价(微信)竞标资源信息
		,bidOrderWechatResInfo : root + '/bidOrderWechatResInfo' + dt
		// 竞标资源价格
		,bidOrderResPrice : root + '/bidOrderResPrice' + dt
		// 竞标订单发消息
		,bidOrderSendMsg : root + '/bidOrderSendMsg' + dt
		// 检查是否该订单出价人数是否已满
		,bidOrderWechatCheck : root + '/bidOrderWechatCheck' + dt

		// 编辑/添加稿件
		,adArticleAdd : root + '/adArticleAdd' + dt
		// 查询我的稿件
		,adArticleList : root + '/adArticleList' + dt
		// 软文下单页-查询我的稿件
		,adArticleNewList : root + '/adArticleNewList' + dt
		// 删除稿件
		,adArticleDel : root + '/adArticleDel' + dt
		// 复制稿件
		,adArticleCopy : root + '/adArticleCopy' + dt
		// 查询活动列表
		,adArticleOrderList : root + '/adArticleOrderList' + dt
		// 导出活动列表
		,adArticleOrderListExport : root + '/adArticleOrderListExport' + dt
		// 查询稿件详情
		,adArticleView : root + '/adArticleView' + dt
		// 获取稿件二维码
		,adArticleQrcode : root + '/adArticleQrcode' + dt

		// 代写稿件增改
		,pxyarticleOrderAdd : root + '/pxyarticleOrderAdd' + dt
		// 代写稿件详情
		,pxyarticleOrderView : root + '/pxyarticleOrderView' + dt
		// 代写稿件列表
		,pxyarticleOrderList : root + '/pxyarticleOrderList' + dt
		// 代写稿件删除
		,pxyarticleOrderDel : root + '/pxyarticleOrderDel' + dt
		// 计算价格
		,pxyarticleOrderSellPrice : root + '/pxyarticleOrderSellPrice' + dt
		// 代写稿件标题更新
		,pxyarticleOrderTitleUpdate : root + '/pxyarticleOrderTitleUpdate' + dt

		// 特殊行业
		,resSpecialList : '/resSpecialList' + dt

		// 优惠券列表
		,couponList : root + '/couponList' + dt
		// 优惠券发放
		,couponAdd : root + '/couponAdd' + dt

		// 媒介主 - 软文 - 接单
		,articleOrderAccepted : root + '/articleOrderAccepted' + dt
		// 媒介主 - 软文 - 不接单
		,articleOrderNoaccept : root + '/articleOrderNoaccept' + dt
		// 媒介主 - 软文 - 接单后拒单
		,articleOrderNodo : root + '/articleOrderNodo' + dt
		// 媒介主 - 软文 - 订单记录
		,articleOrderItemFlowList : root + '/articleOrderItemFlowList' + dt
		// 媒介主 - 软文 - 新订单列表
		,orderItemFlowList : root + '/orderItemFlowList' + dt
	}
})();
